<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link rel="Stylesheet" type="text/css" href="Content/base.css" />
<link rel="Stylesheet" type="text/css" href="Content/blogPage.css" />
<link rel="Stylesheet" type="text/css"
	href="Content/blogPage_articles.css" />
<style type="text/css">
* {
	list-style: none;
}

a {
	text-decoration: none;
}

#pageNum {
	text-align: right;
}

#pageNum a:visited {
	color: #00BFFF;
}

#pageNum a {
	border: 1px solid black;
	padding: 2px;
}

</style>
</head>
<body>
	<div id="page">
		<div id="blog">
			<div id="blogHead">
				<s:action name="header" namespace="/" executeResult="true"></s:action>
			</div>
			<div id="blogBody">
				<div id="sideCol">
					<s:action name="sidebar" namespace="/" executeResult="true"></s:action>
				</div>
				<div id="mainCol">
						<div class="mainCol-head">
						<span class="title">博文</span>
					</div>
					<div class="mainCol-body">
					<c:if test="${empty articleUpdate }">
						&nbsp;&nbsp;&nbsp;&nbsp;暂无该分类博文
					</c:if>
						<c:forEach items="${articleUpdate }" var="a">
							<div id="articles">
								<div class="article">
									<h2 class="article-title">
										<a href="#"><a href="articleDetail?articleId=${a.id }&userId=${a.user.id}">${a.title }</a></a>
									</h2>
									<div class="article-body">
									${a.content }</div>
									<div class="article-link">
										<a href="articleDetail?articleId=${a.id }&userId=${a.user.id}">查看全文&gt;&gt;</a>
									</div>
									<div class="article-footer">
										${a.updateTime }<br /> 阅读（${a.clicks }）| 评论（${a.commentTimes }）
									</div>
								</div>
								<div class="linedot"></div>
						</c:forEach>
					</div>
					<div id="pageNum">
						<c:if test="${pageNum>1}">
							<a href="blog?pageNum=1&userId=${userId}">&lt;&lt;</a>
							<a href="blog?pageNum=${pageNum+1 }&userId=${userId }">&lt;</a>
						</c:if>
						<c:if test="${pageNum <= 1 }">
							<a>&lt;&lt;</a>
							<a>&lt;</a>
						</c:if>
						
						<c:forEach items="${page }" var="p">
							<a href="blog?pageNum=${p }&userId=${userId}">${p }</a>
						</c:forEach>


						<c:if test="${pageNum < totalPage}">
							<a href="blog?pageNum=${pageNum+1 }&userId=${userId }">&gt;</a>
							<a href="blog?pageNum=${totalPage }&userId=${userId }">&gt;&gt;</a>
						</c:if>
						<c:if test="${pageNum == totalPage }">
							<a>&gt;</a>
							<a>&gt;&gt;</a>
						</c:if>
					</div>
			</div>
				<div class="mainCol-foot"></div>
			</div>

		</div>
		<div id="blogFoot"></div>
	</div>
	</div>
</body>
</html>